package cn.edu.swufe.surverpark.datasourcerouter;

import cn.edu.swufe.surverpark.model.Survey;

/**
 *@author 陈龙 E-mail:529914446@qq.com
 *@version创建时间:2015年5月7日下午11:18:57
 *类说明
 */
public class SurveyparkToken {
	
	private static ThreadLocal<SurveyparkToken> l = new ThreadLocal<SurveyparkToken>();
	
	private Survey survey;
	
	public Survey getSurvey(){
		return this.survey;
	}
	public void setSurvey(Survey survey) {
		this.survey = survey;
	}
	public static void bindToken(SurveyparkToken token){
		l.set(token);
	}
	public static void unbindToken(){
		l.remove();
	}
	public static SurveyparkToken getCurrentToken(){
		return l.get();
	}
}

